<template>
    <div>
        <el-tabs v-model="activeName">
            <el-tab-pane :label="$t('menu.stockIn')" name="stockIn">
                <div>
                    <h3 class="title">{{$t('inventory.stockInList')}}</h3>
                    <el-table
                            :data="stockInDetail"
                            border
                            stripe
                            show-summary
                            style="width: 100%">
                        <el-table-column
                                prop="stockInNum"
                                label="入库单号"
                        >
                        </el-table-column>
                        <el-table-column
                                prop="stockInDate"
                                label="入库日期"
                        >
                        </el-table-column>
                        <el-table-column
                                prop="shipInformation"
                                label="船"
                        >
                        </el-table-column>
                        <el-table-column
                                prop="partsQuantity"
                                label="数量">
                        </el-table-column>
                        <el-table-column
                                prop="warehouseDesc"
                                label="仓库">
                        </el-table-column>
                        <el-table-column
                                prop="stockInDesc"
                                label="入库类型">
                        </el-table-column>
                    </el-table>
                    <el-pagination
                            background
                            :page-size="100"
                            @current-change="changePage"
                            layout="prev, pager, next"
                            :total="total2"></el-pagination>
                </div>
            </el-tab-pane>
            <el-tab-pane :label="$t('menu.stockOut')" name="stockOut">
                <div>
                    <h3 class="title">{{$t('inventory.stockOutList')}}</h3>
                    <el-table
                            :data="stockOutDetail"
                            border
                            show-summary
                            stripe
                            style="width: 100%">
                        <el-table-column
                                prop="stockOutNum"
                                label="出库单号"
                        >
                        </el-table-column>
                        <el-table-column
                                prop="stockOutDate"
                                label="出库日期"
                        >
                        </el-table-column>
                        <el-table-column
                                prop="partsQuantity"
                                label="数量">
                        </el-table-column>
                        <el-table-column
                                prop="warehouseDesc"
                                label="仓库">
                        </el-table-column>
                        <el-table-column
                                prop="customer"
                                label="客户">
                        </el-table-column>
                    </el-table>
                    <el-pagination
                            background
                            :page-size="100"
                            @current-change="changePage1"
                            layout="prev, pager, next"
                            :total="total3"></el-pagination>
                </div>
            </el-tab-pane>
        </el-tabs>
    </div>
</template>

<script>
    export default {
        name: "part-stock-detail",
        data() {
            return {
                activeName: 'stockIn'
            }
        },
        methods: {
            changePage(page) {
                this.$emit('inPageChange',page)
            },
            changePage1(page) {
                this.$emit('outPageChange',page)
            }
        },
        props: {
            total2:Number,
            total3:Number,
            stockInDetail: Array,
            stockOutDetail: Array
        }
    }
</script>

<style scoped>

</style>